package habitant;


import java.util.Collection;

import ressourceImpl.QuantiteRessource;

/**
 * 
 * @modelguid {83A0CCDB-2190-4BA0-82D0-4F7CE553E999}
 */
public class Soldat extends Habitant implements Comparable{
	/**
	 * 
	 * @modelguid {745E13F9-32F5-492B-8569-5D0DFAFF2A9B}
	 */
	private int _attaque;

	/**
	 * 
	 * @modelguid {5DFC337C-8F50-42B8-B0E9-B75CE75196A5}
	 */
	private int _defense;
	
	private int _vitesse;
	
	private Collection<QuantiteRessource> _coutFormation;

	/**
	 * 
	 * @modelguid {DBA9DB8D-C2C8-402F-8130-97AC58247381}
	 */
	private String _type;

	public Soldat(int mor, Collection<QuantiteRessource> entretien, int att, int def, int vitesse, String t, Collection<QuantiteRessource> coutFormation){
		super(mor, entretien);
		this.set_attaque(att);
		this.set_defense(def);
		this.set_type(t);
		this.set_coutFormation(coutFormation);
		this.set_vitesse(vitesse);
	}
	
	
	/** @modelguid {01D10304-A80A-487E-9AA3-0894AC9DFF2C} */
	public int get_attaque() {
		/*Begin Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5}*/
		
		return _attaque;
		/*End Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5}*/
	}

	/** @modelguid {10C748F1-B265-4503-816F-398EA3BA98D0} */
	public void set_attaque(int a_attaque) {
		/*Begin Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5}*/
		_attaque = a_attaque;
		/*End Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5}*/
	}

	/** @modelguid {74A4D515-2155-4F52-9215-54268A5ACC8C} */
	public int get_defense() {
		/*Begin Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5}*/
		
		return _defense;
		/*End Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5}*/
	}

	/** @modelguid {6DD00274-C780-4B6A-A0E7-E211E0C77F6B} */
	public void set_defense(int a_defense) {
		/*Begin Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5}*/
		_defense = a_defense;
		/*End Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5}*/
	}

	/** @modelguid {5927F0AF-614B-4194-9890-35E4F3818E49} */
	public String get_type() {
		/*Begin Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5}*/
		
		return _type;
		/*End Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5}*/
	}

	/** @modelguid {63D25CE5-71F1-4E29-AC8E-5BAC90898BB9} */
	public void set_type(String a_type) {
		/*Begin Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5}*/
		_type = a_type;
		/*End Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5}*/
	}


	public int get_vitesse() {
		return _vitesse;
	}


	public void set_vitesse(int _vitesse) {
		this._vitesse = _vitesse;
	}


	public Collection<QuantiteRessource> get_coutFormation() {
		return _coutFormation;
	}


	public void set_coutFormation(Collection<QuantiteRessource> formation) {
		_coutFormation = formation;
	}


	public int compareTo(Object o) {
		if (o.getClass().getName().equals("batiment.Soldat")){
			Soldat s = (Soldat) o;
			return (this._vitesse - s.get_vitesse());
		}
		else
			return -1;
	}

}

